<template>
    <fieldset>
         <legend>home组件</legend>
         <!-- 刷新数据丢失 -->
         <h1>用户名:{{userInfos.nickname}}</h1>
    </fieldset>
</template>

<script>
import { mapState } from 'vuex';
export default {
    name:"home",
    data(){
        return{
            userInfos:""
        }
    },
    computed:{
        ...mapState("user",["userInfo"])
    },
    mounted(){
        this.userInfos =  this.userInfo
    },
    methods:{
       
    }
}
</script>

<style>

</style>